﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/SkyFab.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Web._Default" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:Label ID="FlashMessageLabel" runat="server"></asp:Label>
<h1>Parts Due</h1>

       <div class="span-18">

       <fieldset>
       <legend>Set The Number Of Days For Alert</legend>
        <label>Select Days:</label>
            <asp:DropDownList ID="DaysDropDownList" runat="server" 
               AutoPostBack="True" 
               onselectedindexchanged="DaysDropDownList_SelectedIndexChanged" 
               Width="70px">
        </asp:DropDownList>

        <label>Or Key In Days:</label>
            <asp:TextBox ID="DaysTextBox" runat="server" CssClass="text" Width="100px" ></asp:TextBox>
            <asp:Button ID="SubmitButton" runat="server" Text="Submit" 
               onclick="SubmitButton_Click" CssClass="submitButton" />
           <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
               Text="Generate Excel" />
       </fieldset>

       <div>
       <h2>Due in the next <asp:Label ID="DaysLabel" runat="server"></asp:Label> Days</h2>
       </div>
       </div>

       <div class="span-18">
                <asp:GridView ID="VendorPOItemGridView" runat="server" 
                    AutoGenerateColumns="False" CellPadding="4" 
                    GridLines="None" AllowPaging="False" CssClass="gridview" Width="100%">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="PO No">
                            <ItemTemplate>
                                <asp:HyperLink ID="PONoHyperLink" runat="server" NavigateUrl='<%# "VendorPODetail.aspx?vendPOid="+Eval("VendPOId") %>'><%# Eval("VendorPONo")%></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ProductNo" HeaderText="P/N" />
                        <asp:BoundField DataField="RequestQty" HeaderText="Request Qty" />
                        <asp:BoundField DataField="CompleteQty" HeaderText="Completed Qty" />
                        <asp:BoundField DataField="OpenQty" HeaderText="Open Qty" />
                        <asp:BoundField DataField="Lot" HeaderText="Lot" />
                        <asp:BoundField DataField="RequestDate" DataFormatString="{0:dd MMM yyyy}" 
                            HeaderText="Date" />
                        <asp:BoundField DataField="VendorName" HeaderText="Vendor" />
                        
                    </Columns>
                    
                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle HorizontalAlign="Center" CssClass="pagerTable" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
       </div>


<h1>Contract Due</h1>

       <div class="span-18">

       <fieldset>
       <legend>Set The Lot Size For Alert</legend>
        <label>Select Lot Size:</label>
            <asp:DropDownList ID="LotsDropDownList" runat="server" 
               AutoPostBack="True" 
               onselectedindexchanged="LotsDropDownList_SelectedIndexChanged" 
               Width="70px">
        </asp:DropDownList>

        <label>Or Key In Lots:</label>
            <asp:TextBox ID="LotsTextBox" runat="server" CssClass="text" Width="100px" ></asp:TextBox>
            <asp:Button ID="LotsSubmitButton" runat="server" Text="Submit" 
               onclick="LotsSubmitButton_Click" CssClass="submitButton" />
       </fieldset>

       <div>
       <h2>Contract Due Within <asp:Label ID="LotsLabel" runat="server"></asp:Label> Lots</h2>
       </div>
       </div>

       <div class="span-18">
                <asp:GridView ID="CustomerPOItemGridView" runat="server" 
                    AutoGenerateColumns="False" CellPadding="4" 
                    GridLines="None" AllowPaging="False" CssClass="gridview" Width="100%">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="PO No">
                            <ItemTemplate>
                                <asp:HyperLink ID="PONoHyperLink" runat="server" NavigateUrl='<%# "CustomerPODetail.aspx?custPOId="+Eval("CustPoId") %>'><%# Eval("CustPoNo")%></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Product No">
                            <ItemTemplate>
                                <asp:HyperLink ID="ProductHyperLink" runat="server" NavigateUrl='<%# "ProductDetail.aspx?id="+Eval("ProductId") %>'><%# Eval("ProductNo")%></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:BoundField DataField="TotalRequestedQty" HeaderText="Request Qty" />
                        <asp:BoundField DataField="TotalCompletedQty" HeaderText="Completed Qty" />
                        <asp:BoundField DataField="TotalOpenQty" HeaderText="Open Qty" />
                        <asp:BoundField DataField="Lot" HeaderText="Lot" />
                        <asp:BoundField DataField="LatestDeliveryDate" DataFormatString="{0:dd MMM yyyy}" 
                            HeaderText="Latest Delivery Date" />




                    </Columns>
                    
                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle HorizontalAlign="Center" CssClass="pagerTable" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
       </div>
</asp:Content>
